// 当前的数据文件
import { SET_FILES, REMOVE_FILES } from '../constant';
import { DIRECTORIES, FILES } from '../../constant';

const intiValue = {
  [DIRECTORIES]: [],
  [FILES]: [],
  checkedAll: false,
  checkedCount: 0
};


export default function folder (prev = intiValue, action) {
  const {
    type,
    data
  } = action;
  switch (type) {
  case SET_FILES:
    return Object.assign({}, data)
  case REMOVE_FILES:
    return {}
  default:
    return prev
  }
}
